cmake_minimum_required(VERSION 3.15)

project(ecal_demo)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

MESSAGE(STATUS "operation system is ${CMAKE_SYSTEM}")
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
  set(CMAKE_PREFIX_PATH "D:/eCAL")
  set(Protobuf_USE_STATIC_LIBS ON)
endif()

find_package(eCAL REQUIRED)
find_package(Protobuf REQUIRED)

message(STATUS "eCAL include dir: ${eCAL_INCLUDE_DIRS}")
message(STATUS "eCAL library dir: ${eCAL_LIBRARY_DIRS}")
message(STATUS "Protobuf include dir: ${PROTOBUF_INCLUDE_DIRS}")
message(STATUS "Protobuf library dir: ${PROTOBUF_LIBRARY_DIRS}")

include_directories(
  thirdparty/argparse/include
  ${CMAKE_CURRENT_BINARY_DIR}
  ${eCAL_INCLUDE_DIRS}
  ${PROTOBUF_INCLUDE_DIRS}
)

add_subdirectory(protocol)
add_subdirectory(publisher)
add_subdirectory(subscriber)
add_subdirectory(service_server)
add_subdirectory(service_client)
add_subdirectory(tools)